package xyz.renyumeng.xkm.client.shop;

import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import xyz.renyumeng.xkm.config.feign.FeignConfig;
import xyz.renyumeng.xkm.dto.shop.ProductInfoDto;
import xyz.renyumeng.xkm.model.es.EsProduct;
import xyz.renyumeng.xkm.model.shop.ProductInfo;

import java.util.List;

/**
 * @author renyumeng
 * @date Created in 16:46 2023/6/30
 */

@RestController
@FeignClient(
        value = "service-shop",
        configuration = FeignConfig.class
//        contextId = "product"
)
@RequestMapping("/admin/shop/product/inner")
public interface ProductInfoFeignClient {
    @GetMapping("/{id}")
    ProductInfo innerGetProductInfoAndOwnerUserInfoById(@PathVariable Long id);

    @PutMapping("/{id}")
    Boolean innerUpdateSoledInfoById(@PathVariable Long id);


    @PutMapping("/update")
    Boolean updateProduct(@RequestBody ProductInfoDto productInfoDto);

    @GetMapping("/getAll")
    List<EsProduct> getAll();



}
